package cn.tedu.oop;
/**本类用来练习面向对象
 * 分析手机事物:--通过类来描述
 * 属性:品牌 价格 尺寸 颜色
 * 功能:打电话 发短信 听直播
 * */
public class Practice {
    public static void main(String[] args) {
        Hero Timoo=new Hero();
        Timoo.blood=20;
        Timoo.legendary();
        Timoo.hp=200;
       System.out.println("当前提莫的血量为"+Timoo.getHp());
       System.out.println();
       Timoo.recovery(Timoo.blood);
       System.out.println("恢复"+Timoo.blood+"血量");
        System.out.println("现在血量为"+Timoo.hp);
//        Item i1=new Item();
//        Item i2=new Item();
//        Item i3=new Item();
//       i1.setName("血瓶");
//       i2.setName("草鞋");
//       i3.setName("长剑");
//       i1.setPrice(50);
//       i2.setPrice(300);
//       i3.setPrice(350);
//       System.out.println(i1.getName()+" "+i1.getPrice());
//       System.out.println(i2.getName()+" "+i2.getPrice());
//       System.out.println(i3.getName()+" "+i3.getPrice());

//        Car1 c=new Car1();
//        c.setBrand("Tesla");
//        c.setColor("white");
//        c.setExhaustVolume(0.0);
//        c.setPrice(25000);
//        System.out.println(c.getBrand());
//        System.out.println(c.getColor());
//        System.out.println(c.getExhaustVolume());
//        System.out.println(c.getPrice());

//        Phone1 p=new Phone1();
//        Phone1 p1=new Phone1();
//        Student1 s=new Student1();
//        s.setId(999);
//        s.setGender("男生");
//        s.setName("王大彪");
//        System.out.println(s.getName());
//        System.out.println(s.getId());
//        System.out.println(s.getGender());
//        s.eat();
//        p.brand="Apple";
//        p.color="red";
//        p.price=8898;
//        p.size=6.9;
//        System.out.println(p.brand);
//        System.out.println(p.price);
//        System.out.println(p.color);
//        System.out.println(p.size);
//        p.call();
//        p.message();
//        p.video();
//        System.out.println(p1.size);
//        System.out.println(p1.price);
//        System.out.println(p1.color);
//        System.out.println(p1.brand);
    }
}
class Phone1{
    String brand;
    double price;
    double size;
    String color;
    public void call(){
        System.out.println("打电话");
    }
    public void message(){
        System.out.println("发短信");
    }
    public void video(){
        System.out.println("听直播");
    }
}
class Student1{
    private String name;
    private  int id;
    private String gender;
    private void study(){
        System.out.println("一天不学习我浑身难受");
    }
    public void eat(){
        study();
        System.out.println("干饭人，干饭魂");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
class Car1{
    private String brand;
    private String color;
    private double price;
    private double ExhaustVolume;
    public void climb(){
        System.out.println("正在爬山");
        HighSpeed();
    }
    private void HighSpeed(){
        System.out.println("正在跑高速");
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getExhaustVolume() {
        return ExhaustVolume;
    }

    public void setExhaustVolume(double exhaustVolume) {
        ExhaustVolume = exhaustVolume;
    }
}
class Item{
   private String name;
    private double price;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
class Hero{
    String name;
    float hp;
    float armor;
    int movespeed;
    float blood;
    void keng(){
        System.out.println("坑队友");
    }
    float GetArmor(){
        return armor;
    }
    void addspeed(int speed){
        movespeed=movespeed+speed;
    }
    void legendary(){
        System.out.println("超神");
    }
    float getHp(){
        return hp;
    }
    void recovery(float blood){
        hp=hp+blood;
    }
}